<jsp:include page="plantilla1.jsp" />

<center>

<form name="form1" method="post" action="RegistrarInstrumentoSala" style="height: 292px; ">
  <p align="center" style="color: orange; ">ARMADO SALA</p>
  <table width="*" border="0" >
    <tr>
      <td style="width: 502px; " align="left">
       
       Sala:
       <select style="width: 139px;" name="cboSala" id="cboSala" >
       	<option>Seleccione</option>
       	<%@page import="java.util.*, studio7i.modelo.Sala" %>
       	<%
       		Collection<Sala> arregloSala = (ArrayList<Sala>)request.getAttribute("SalaListado");
       		if(arregloSala != null) {
       			int i = 1;
       			for(Sala x : arregloSala) {
       				%>  
       				<option value=<%=x.getIdSala() %>><% out.print(x.getNombre()); %></option>
       			<%}
       		}%>
       </select>
       <br>
      
				</td>
    </tr>
  </table>
  
  <b align="left" style="width: 486px; color: orange"><br></b>		
  <table width="*" border="0">
    <tr>
      <td style="width: 482px; " align="left">
      
      Instrumento: 
    	<select style="width: 192px;" id="cboInstrumento" name="cboInstrumento" >
    		<option>Seleccione</option>
			<%@page import="java.util.*, studio7i.modelo.Instrumento" %>
				<%
					Collection<Instrumento> arregloInst = (ArrayList<Instrumento>)request.getAttribute("InstrumentoListado");
					if(arregloInst != null) {
       			int i = 1;
       			for(Instrumento x : arregloInst) {
       				%>  
       				<option value=<%=x.getIdInstrumento() %>><% out.print(x.getNombre()); %></option>
       			<%}
       		}%>
       </select>
    	<br><br><input type="submit" value="Agregar instrumento"  ><br><br>
    	<table width="*" border="1" cellspacing="2" cellpadding="2" style="color: Black">
    	    <tr>
			<th>Id Instrumento</th>
			<th>Id Sala</th>
    	    </tr>
    	    <%@page import="java.util.*, studio7i.modelo.Instrumento_Sala" %>
    	    <%
    	    	Collection<Instrumento_Sala> oInstSala = (ArrayList<Instrumento_Sala>)request.getAttribute("inst_salas");
    	    	if(oInstSala != null) { 
    	    		int i = 1;
    	    		for(Instrumento_Sala x : oInstSala) {
    	    		%>  
    	    		  <tr>
    	    		    <td><% out.print(x.getInstrumento().getIdInstrumento()); %></td>
    	    		    <td><% out.print(x.getSala().getIdSala()); %></td>    	    		    
    	    		    
    	    		  </tr>
    	    		<% }  
    	    		  } %>
			
    	    
 	    	

    	</table>
					 
      </td>
    </tr>
  </table>

  <b align="left" style="width: 486px; color: orange"><br></b>  
<table width="*" border="0">
    <tr>
      <td style="width: 482px; " align="left">
      Servicio: 
    	<select style="width: 192px;" id="cboServicio" name="cboServicio" >
    		<option>Seleccione</option>
			<%@page import="java.util.*, studio7i.modelo.Servicio" %>
				<%
					Collection<Servicio> arregloServ = (ArrayList<Servicio>)request.getAttribute("ServicioListado");
					if(arregloServ != null) {
       			int i = 1;
       			for(Servicio x : arregloServ) {
       				%>  
       				<option value=<%=x.getIdServicio() %>><% out.print(x.getNombre()); %></option>
       			<%}
       		}%>
       </select>
    	<br><br>
    	
					<br>
      <input type="submit" value="Aceptar" align="top">
      <input type="submit" value="Cancelar" align="top"> 
      </td>
    </tr>
  </table>  
	</form>
<p>
</p>
</center>

<jsp:include page="plantilla2.jsp" />